Skip to content

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 6, 2021

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

MaxDesiatov and others added 26 commits December 8, 2020 14:30
This commit adds standard conventions for Vim filetype plugins:

- Allows users to opt out of using the provided ftplugin file, if they
  choose to install and use another set of runtime files for Swift
  (which offers its own version of ftplugin for Swift), It also prevents
  this ftplugin file from being sourced again if a ftplugin file for
  Swift was already sourced. Vim's documentation on this recommends
  offering users this option as well, under the "DISABLING" section
  of `:help write-filetype-plugin`).

- Adds the `b:undo_ftplugin` buffer local variable, which is used to
  undo the filetype settings when the `:setfiletype` command is used
  (See :help `undo_ftplugin`). Also prefer using the full names for Vim
  settings instead of short ones as they are more readable.

The above conventions are in place in many of the ftplugin files
shipped with Vim, so they can be used as a reference, as well.
In some cases when building the `XAudio` module, we would end up going
down C++ paths:

```
C:\Program Files (x86)\Windows Kits\10\/Include/10.0.17763.0/um/xaudio2.h:61:26: error: 'uuid' attribute is not supported in C
    interface __declspec(uuid("2B02E3CF-2E0B-4ec3-BE45-1B2A3FE7210D")) IXAudio2;
                             ^
<module-includes>:29:10: note: in file included from <module-includes>:29:
         ^
```

Although this works with newer SDKs, it does not work with older SDKs.
Filter out the module for the time being with a requirement on `C++`.
This should be possible to use with `-enable-cxx-interop`.
This becomes tricky with the new per-request cache representation.

We can add it back later if we need it, but I feel like this code
path isn't particularly useful right now anyway.
This is based on an earlier patch by @hamishknight.

The idea is that instead of caching results in a single DenseMap
that maps AnyRequest to AnyValue, we instead define a separate
DenseMap for each request kind that directly uses the request as
the key, and the request value as the value.

This avoids type erasure and memory allocation overhead arising
from the use of AnyRequest and AnyValue. There are no remaining
usages of AnyValue, and the only usage of AnyRequest is now in
the reference dependency tracking, which can be refactored to use
a similar strategy of storing per-request maps as well.
... instead of passing around an ActiveRequest.
Just as with the result cache, instead of a single DenseMap with
type-erased AnyRequest keys, we can use per-request maps for a
nice performance improvement.
Canonicalizing OSSA provably minimizes the number of retains and
releases within the boundaries of that lifetime. This eliminates the
need for ad-hoc optimization of OSSA copies.

This initial implementation only canonicalizes owned values, but
canonicalizing guaranteed values is a simple extension.

This was originally part of the CopyPropagation prototype years
ago. Now OSSA is specified completely enough that it can be turned
into a simple utility instead.

CanonicalOSSALifetime uses PrunedLiveness to find the extended live
range and identify the consumes on the boundary. All other consumes
need their own copy. No other copies are needed.

By running this after other transformations that affect OSSA
lifetimes, we can avoid the need to run pattern-matching optimization
to SemanticARC to recover from suboptimal patterns, which is not
robust, maintainable, or efficient.
MandatoryCopyPropagation must be a separate pass in order to preserve
all debug_value instructions. CopyPropagation cannot preserve
debug_value because, as a rule, debug information cannot affect -O
behavior.
@actorIndependent is needed on declarations outside of actors to
(e.g.) disable inference of a global actor. It is also effectively the
default, so allow it to be specified explicitly.
If a guaranteed value is not a recognized and handled borrow
introducer, then treat the copy as a separate owned live range.
…endent

[Concurrency] Loosen constraints on @actorIndependent placement.
[SR-13753][Diagnostics] Downgrade l-value unused diagnostics to warning
shahmishal and others added 3 commits January 6, 2021 09:14
CMake: fix build for Apple Silicon hosts

When building with `build-script` using these arguments

```
utils/build-script --skip-build-benchmarks
  --skip-ios --skip-watchos --skip-tvos
  --swift-darwin-supported-archs "arm64"
  --sccache --release-debuginfo --test
```

the build fails with

```
ninja: error: 'stdlib/swift-test-stdlib-macosx-x86_64',
needed by 'stdlib/CMakeFiles/swift-test-stdlib', missing and no known rule to make it
```

I think that the "Getting Started" guide should avoid hardcoding `x86_64` arguments, and suggest using `$(uname -m)` instead. `SWIFT_PRIMARY_VARIANT_ARCH_default` could also get its value from `CMAKE_HOST_SYSTEM_PROCESSOR` in the root `CMakeLists.txt`.

Resolves SR-13943.
@pull pull bot merged commit f88d8e2 into swiftwasm Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.